/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package queenb.web.store;

import java.sql.SQLException;
import java.util.Date;
import java.util.List;
import java.util.logging.Level;
import java.util.logging.Logger;
import oracle.jdbc.OracleTypes;
import queenb.net.datacontrol.DataStatement;
import queenb.net.datacontrol.Param;
import queenb.net.entitybean.N100;
import queenb.web.crm.store.V030Store;
import queenb.web.util.PackageContants;

/**
 *
 * @author Hung.Ngo
 */
public class V100Store extends N100 {

    public int updateV100(int pvPV100, int pnFV050, int pvFH000, int pvFH200,
            String VV101, String VV102, String VV103, String VV104, String VV105, String VV106, String VV107, String VV108, String VV109, String VV110, String VV111, Date VD112, Date VD113,
            String VV114, String VV115, String VV116, String VV117, String VV118, String VV119, String VV120, String VV121, String VV122, Date VD123, Date VD124, String pvLOGIN) throws SQLException, InstantiationException, IllegalAccessException {
        try {
            DataStatement dateStatement = new DataStatement(PackageContants.UPDATE_V100, OracleTypes.INTEGER, new Param[]{
                        new Param(OracleTypes.INTEGER, pvPV100),
                        new Param(OracleTypes.INTEGER, pnFV050),
                        new Param(OracleTypes.INTEGER, pvFH000),
                        new Param(OracleTypes.INTEGER, pvFH200),
                        new Param(OracleTypes.CHAR, VV101),
                        new Param(OracleTypes.CHAR, VV102),
                        new Param(OracleTypes.CHAR, VV103),
                        new Param(OracleTypes.CHAR, VV104),
                        new Param(OracleTypes.CHAR, VV105),
                        new Param(OracleTypes.CHAR, VV106),
                        new Param(OracleTypes.CHAR, VV107),
                        new Param(OracleTypes.CHAR, VV108),
                        new Param(OracleTypes.CHAR, VV109),
                        new Param(OracleTypes.CHAR, VV110),
                        new Param(OracleTypes.CHAR, VV111),
                        new Param(OracleTypes.DATE, VD112),
                        new Param(OracleTypes.DATE, VD113),
                        new Param(OracleTypes.CHAR, VV114),
                        new Param(OracleTypes.CHAR, VV115),
                        new Param(OracleTypes.CHAR, VV116),
                        new Param(OracleTypes.CHAR, VV117),
                        new Param(OracleTypes.CHAR, VV118),
                        new Param(OracleTypes.CHAR, VV119),
                        new Param(OracleTypes.CHAR, VV120),
                        new Param(OracleTypes.CHAR, VV121),
                        new Param(OracleTypes.CHAR, VV122),
                        new Param(OracleTypes.DATE, VD123),
                        new Param(OracleTypes.DATE, VD124),
                        new Param(OracleTypes.CHAR, pvLOGIN)});
            return super.update(dateStatement, N100.class);
        } catch (SQLException ex) {
            Logger.getLogger(V030Store.class.getName()).log(Level.SEVERE, null, ex);
            return 0;
        }

    }
    
     public List<N100> VCURPKS_LISTOFTABV100(int pnPV100, int pnFH000, int pnFH200, String pvLOGIN)
            throws SQLException, InstantiationException, IllegalAccessException {
        DataStatement dataStatement = new DataStatement(PackageContants.LIST_V100, OracleTypes.CURSOR, new Param[]{
             new Param(OracleTypes.INTEGER, pnPV100),
                    new Param(OracleTypes.INTEGER, pnFH000),
                    new Param(OracleTypes.INTEGER, pnFH200),
                    new Param(OracleTypes.CHAR, pvLOGIN)
                });

        return super.find(dataStatement, N100.class);


    }
}
